import request from '@/utils/request'
// 登录
export const loginAPI = (loginForm) => {
  return request({
    method: 'post',
    url: '/frame/login',
    data: loginForm

  })
}
// 获取用户列表
export const getUSerListAPI = (query) => {
  return request({
    method: 'get',
    url: '/users',
    query

  })
}
// 新增用户
export const addUserAPI = (userForm) => {
  return request({
    method: 'post',
    url: '/users',
    data: userForm

  })
}
// 用户详情获取
export const editUserAPI = (id) => {
  return request({
    method: 'get',
    url: `/users/${id}`

  })
}
// 权限组列表
export const limitListAPI = (query) => {
  return request({
    method: 'get',
    url: '/permissions',
    query
  })
}
// 用户修改

export const editUserContentAPI = (userform) => {
  return request({
    method: 'put',
    url: `/users/${userform.id}`,
    data: userform

  })
}
// 删除用户
export const delUserAPI = (id) => {
  return request({
    method: 'delete',
    url: `/users/${id}`

  })
}
